[IA64] Add HYPERVISOR_vcpu_op
authorawilliam@xenbuild2.aw <awilliam@xenbuild2.aw>
Thu, 8 Mar 2007 16:50:25 +0000 (09:50 -0700)
committerawilliam@xenbuild2.aw <awilliam@xenbuild2.aw>
Thu, 8 Mar 2007 16:50:25 +0000 (09:50 -0700)
For support of steal time accounting, only supports
VCPUOP_register_runstate_memory_area right now.

Signed-off-by: Atsushi SAKAI <sakaia@jp.fujitsu.com>
linux-2.6-xen-sparse/arch/ia64/xen/xcom_hcall.c
linux-2.6-xen-sparse/include/asm-ia64/hypercall.h
linux-2.6-xen-sparse/include/asm-ia64/xen/xcom_hcall.h

index 49f9ea6708778fb6b1196c47d56f647f40c2981b..135a9e1533a6cb98590c8eb6a4fb8f51241755a0 100644 (file)
@@ -33,6 +33,7 @@
 #include <xen/interface/acm_ops.h>
 #include <xen/interface/hvm/params.h>
 #include <xen/interface/xenoprof.h>
+#include <xen/interface/vcpu.h>
 #include <asm/hypercall.h>
 #include <asm/page.h>
 #include <asm/uaccess.h>
@@ -363,3 +364,20 @@ xencomm_hypercall_perfmon_op(unsigned long cmd, void* arg, unsigned long count)
                                                 xencomm_create_inline(arg),
                                                 count);
 }
+
+long
+xencomm_hypercall_vcpu_op(int cmd, int cpu, void *arg)
+{
+       switch (cmd) {
+       case VCPUOP_register_runstate_memory_area:
+               xencommize_memory_reservation((xen_memory_reservation_t *)arg);
+               break;
+
+       default:
+               printk("%s: unknown vcpu op %d\n", __func__, cmd);
+               return -ENOSYS;
+       }
+
+       return xencomm_arch_hypercall_vcpu_op(cmd, cpu,
+                                             xencomm_create_inline(arg));
+}
index 9ae66fe78166679eebcda29ab6464a99589bc15b..62073e695020a792acef7ad3632e1cf90d968da9 100644 (file)
@@ -205,6 +205,12 @@ xencomm_arch_hypercall_hvm_op(int cmd, void *arg)
        return _hypercall2(unsigned long, hvm_op, cmd, arg);
 }
 
+static inline long
+xencomm_arch_hypercall_vcpu_op(int cmd, int cpu, void *arg)
+{
+       return _hypercall3(long, vcpu_op, cmd, cpu, arg);
+}
+
 static inline int
 HYPERVISOR_physdev_op(int cmd, void *arg)
 {
@@ -405,5 +411,6 @@ xencomm_arch_hypercall_perfmon_op(unsigned long cmd,
 #endif
 
 #define HYPERVISOR_suspend xencomm_hypercall_suspend
+#define HYPERVISOR_vcpu_op xencomm_hypercall_vcpu_op
 
 #endif /* __HYPERCALL_H__ */
index 79e790d75b47a9b3f84aef4dc3e9546191b638a0..913f2761ee5650ac85d9d4b0b1b21d875b5a8fb7 100644 (file)
@@ -51,6 +51,8 @@ extern int xencomm_hypercall_xenoprof_op(int op, void *arg);
 extern int xencomm_hypercall_perfmon_op(unsigned long cmd, void* arg,
                                         unsigned long count);
 
+extern long xencomm_hypercall_vcpu_op(int cmd, int cpu, void *arg);
+
 /* Using mini xencomm.  */
 extern int xencomm_mini_hypercall_console_io(int cmd, int count, char *str);